<template>
	<view class="main">
		<view class="content ">
			<view class="navbar" :style="{paddingTop: safeAreaInsets.top+ 'px'}">
				<view class="logo">
					<image class="logo-image" src="@/static/logo.png"></image>

					<text class="logo-text">广场</text>
					<view style="width: 166rpx;display: flex;justify-content: space-around;">
						<u-icon name="search" color="#13D069" size="48rpx" @click="scanCode"></u-icon>
						<u-icon name="plus-circle" color="#13D069" size="40rpx" @click="scanCode"></u-icon>
					</view>
				</view>
			</view>
			<view class="" style="margin-top:20rpx ;">
				<u-swiper height="170" :list="list1" @change="change" @click="click"></u-swiper>
			</view>
			<view style="margin-top: 20rpx;">
				<view style="display: flex;align-items: center;background-color:#F5F5F5 ;justify-content: flex-start;">
					<view>
						<text style=" font-size: 24rpx;color: #333333; font-weight: 700;margin-left: 20rpx">官方<text
								style="color: #13D069;">快讯</text></text>
					</view>
					<u-notice-bar  icon="" :text="text1" color="#333333" bgColor="#F5F5F5" >
						<view slot="icon">123</view>
					</u-notice-bar>
				</view>
			</view>
			<view style="margin-top: 35rpx;" class="">
				<u-row justify="space-around" gutter="10">
					<u-col  v-for="(baseListItem,baseListIndex) in baseList" :key="baseListIndex"
						style="border: 1px solid #F3B143;border-radius: 14rpx;" span="3.5">
						 <view class="flexA">
						 	<u--image  :showLoading="true" src="https://cdn.uviewui.com/uview/album/1.jpg" width="100rpx"
						 		height="95rpx" style="margin: 20rpx 0;"></u--image>
						 </view>
						<view style="margin: 0 auto;">
							<view
								style="background: #13D069;border-radius: 30%;width: 78rpx;height: 17rpx; position: relative;margin:12rpx  0;">
								<text class="grid-text" color="#333333"
									style="font-weight: 800; position: absolute; top: -20rpx;left: 10%; font-size: 25rpx;">{{baseListItem.title}}</text>
							</view>
						</view>
						<text
							style="font-size: 15rpx; color: #333333; text-align: center; padding:  0 20rpx; margin: 10rpx 0;">这里提供一些门票供大家选择</text>
					</u-col>
				</u-row>
			</view>
			<view style="border: 1px #13D069 solid;margin-top: 24rpx; border-radius: 14rpx;">
				<u-cell-group>
					<u-cell isLink rightIconStyle=" color:#13D069" :border="false">
						<view slot="title">
							<text class="u-cell-text" style="color: #333333;font-weight: bold;font-size: 28rpx;">我的
								<text style="color: #13D069;font-weight: bold;font-size: 28rpx;">社团</text>
							</text>
						</view>
						<text slot="value" style="color: #13D069;font-size: 20rpx;">查看更多</text>
					</u-cell>
				</u-cell-group>
				<u-grid col="6" :border="false" @click="click" class="main">
					<u-grid-item v-for="(baseListItem,baseListIndex) in baseList2" :key="baseListIndex">
						<view class="u-demo-block">
							<view class="u-demo-block__content">
								<view style="position: relative">
									<u--image shape="circle" src="https://cdn.uviewui.com/uview/album/1.jpg"
										width="80rpx" height="80rpx"></u--image>
									<u-badge :isDot="true" type="success"
										style="position: absolute;right: 0;bottom: 0;"></u-badge>
								</view>
							</view>
						</view>
						<text class="sl">{{baseListItem.title}}</text>
					</u-grid-item>
				</u-grid>
			</view>
			<view>
				<u-grid :border="false" col="2">
					<u-grid-item v-for="(baseListItem,baseListIndex) in baseList2" :key="baseListIndex">
						<u--image radius="20rpx" :showLoading="true" src="https://cdn.uviewui.com/uview/album/1.jpg"
							width="320rpx" height="240rpx" style="margin: 20rpx 0;"></u--image>
						<view style="height: 40rpx;display: flex;justify-content: space-between; width: 320rpx;">
							<view style="width: 120rpx;">
								<text style="color:#FD4C46; font-size: 24rpx;">5星社团</text>
							</view>
							<view style="flex: 1;text-align: right;">
								<text style="color:#3D3D3D ; font-size: 20rpx;font-weight: 700rpx;"
									class="sl">园艺技术大比拼2日多</text>
							</view>
						</view>
						<view style="height: 40rpx;display: flex;justify-content: space-between;width: 320rpx; ">
							<view style="width: 200rpx;">
								<text style="color: #F3B143; font-size: 24rpx;">2024-03-09 14:00</text>
							</view>
							<view style="flex: 1;text-align: center; margin-top: 5rpx;">
								<text style="color:#888888 ; font-size: 12rpx;" class="sl ">200+人报名</text>
							</view>
						</view>
						<view 
							style="height: 35rpx;margin-top:10rpx;display: flex;justify-content: space-between;width: 320rpx; background-color: #EFEFEF;border-radius: 100rpx;align-items: center;padding: 6rpx;">
							<view 
								style="margin-left: 10rpx;align-items: center;display: flex; justify-content: center; ">
								<text style="color: #13D069; font-size: 12rpx;">德育</text>
								<text
									style="color:#3D3D3D ; font-size: 12rpx;text-align: left;flex: 1;margin-left: 5rpx;"
									class="sl">计算机软件编程社</text>
							</view>
							<view style="width:100rpx;text-align: center;align-items: center; " class="sl">
								<text style="color:#888888; font-size: 12rpx;">查看详情></text>
							</view>
						</view>
					</u-grid-item>
				</u-grid>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			const {
				safeAreaInsets
			} = uni.getSystemInfoSync()
			return {
				safeAreaInsets,
				list1: [
					'https://cdn.uviewui.com/uview/swiper/swiper1.png',
					'https://cdn.uviewui.com/uview/swiper/swiper2.png',
					'https://cdn.uviewui.com/uview/swiper/swiper3.png',
				],
				text1: 'uView UI众多组件覆盖开发过程的各个需求，组件功能丰富，多端兼容。让您快速集成，开箱即用',
				text2: 'uView UI众多的贴心小工具，是您开发过程中召之即来的利器，让您飞镖在手，百步穿杨',
				text3: 'uView UI收集众多的常用页面和布局，减少开发者的重复工作，让您专注逻辑，事半功倍',
				text4: [
					'寒雨连江夜入吴',
					'平明送客楚山孤',
					'洛阳亲友如相问',
					'一片冰心在玉壶'
				],
				text5: '涵盖uniapp各个方面，给开发者方向指导和设计理念，让您茅塞顿开，一马平川',
				baseList: [{
						name: 'photo',
						title: '门票'
					},
					{
						name: 'lock',
						title: '活动'
					},
					{
						name: 'star',
						title: '商场'
					},
				],
				baseList2: [{
						name: 'photo',
						title: '图片222222'
					},
					{
						name: 'lock',
						title: '锁头2222222'
					},
					{
						name: 'star',
						title: '星星'
					},
					{
						name: 'photo',
						title: '图片'
					},
					{
						name: 'lock',
						title: '锁头'
					},
					{
						name: 'star',
						title: '星星'
					},
				],
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.content {
		margin: 0 20rpx;
		padding: 0;

	}

	.sl {
		width: 100%;
		text-align: center;
		margin: 10rpx 0;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
		overflow: hidden;
		font-size: 18rpx;
		color: #999999;
	}

	.sl2 {
		width: 100%;
		margin: 5rpx 0;
		text-align: center;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
		overflow: hidden;

		color: #999999;
	}

	.logo {
		display: flex;
		align-items: center;
		height: 64rpx;
		justify-content: space-around;
		padding-top: 20rpx;

		.logo-image {
			width: 172rpx;
			height: 50rpx;
		}


		.logo-text {
			text-align: center;
			flex: 1;
			line-height: 28rpx;
			color: #3D3D3D;
			margin: 2rpx 0 0 20rpx;
			font-size: 38rpx;
			font-weight: 800;
		}
	}
</style>